package com.zusmart.core.context;

import java.util.Map;

import com.zusmart.base.activity.Activity;
import com.zusmart.core.bean.BeanDefinitionRegistry;

public interface ApplicationContext extends Activity<ApplicationContext> {

	public BeanDefinitionRegistry getBeanDefinitionRegistry();

	// 获取Bean实例,获取不到不抛异常,返回Null
	public <T> T getBean(Class<T> beanType, String beanName);

	// 获取Bean实例,获取不到不抛异常,返回Null
	public <T> T getBean(Class<T> beanType);

	// 获取Bean实例,获取不到不抛异常,返回Null
	public <T> T getBean(String beanName);

	// 获取Bean实例，通常通过父类来获取子类的实例
	public <T> Map<String, T> getBeans(Class<T> beanType);

}